package com.bknow.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import com.bknow.model.ArticleInfo;
import com.bknow.model.CommentInfo;
import com.bknow.model.SaveLoveInfo;


@Service
public interface ArticleMapper {

	List<ArticleInfo> getAllArticle();

	List<CommentInfo> getCommentByArtiId(Integer articleId);
	
	int addComment(CommentInfo info);

	CommentInfo findCommentById(Integer commentId);

	int queryCommentTotal(Integer articleId);

	int updateCommentTotal(int comment_total,Integer articleId);

	List<SaveLoveInfo> getLoveByuId(Integer uId);

	int queryLoveIsExist(Integer uId, Integer articleId);

	int addLove(int i, Integer uId, Integer articleId);

	int queryTotalLove(Integer articleId);

	int updateTotalLove(Integer articleId, int i);

	int queryLove(Integer uId, Integer articleId);

	int updateLove(Integer uId, Integer articleId, int i);

	int addArticle(String uploadfile, String articleTitle, String summry,
			String content, String date, int i, int j,int k, int l, String uId);
	int findArticleCount();

	List<ArticleInfo> findArticleBystartLimit(@Param("start")int start, @Param("limit")int limit);

	int findGarbageArticleCount();//查找回收站的文章总量

	//查找回收站文章
	List<ArticleInfo> findGarbageArticleBystartLimit(@Param("start")int start, @Param("limit")int limit);

	//更改文章状态
	int changeArticleStatus(@Param("array")String[] arr, @Param("status")String status);

	//批量彻底删除所有文章
	int deletePatchArticle(String[] arr);
	
	
}

